package com.jielin.handling.mapper.record;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jielin.handling.entity.record.RecordCommonalityModel;
import com.jielin.handling.entity.record.RecordCommonalityVo;

public interface RecordCommonalityModelMapper {

	List<RecordCommonalityModel> findCommonalityByModelId(@Param("modeltypeid") String modeltypeid,
			@Param("policeId") String policeId);// 根据笔录类型id查询所有笔录模板信息

	List<RecordCommonalityModel> findMyModelById(String policeId);// 根据用户id查询自定义笔录信息

	int addMyModel(RecordCommonalityModel rcm);// 添加用户自定义笔录信息

	Integer getCountByModelId(@Param("modelTypeId") String modelTypeId, @Param("policeId") String[] policeId);// 根据笔录类型id查询笔录模板数量

	List<RecordCommonalityVo> findRecordByAll(@Param("modelId") String modelId, @Param("modelName") String modelName,
			@Param("keyWord") String keyWord, @Param("policeId") String policeId);// 模糊查询笔录模板(1.笔录类型2.名称3.关键字)

	String findModelPoliceIdByModelId(String id);// 查询该模板的所属者警员id

	List<String> findModelInfoByModelId(String id);// 查询该模板的问题id

	int deleteById(String id);// 删除模板

	/**
	 *  添加用户自定义笔录信息
	 * @param rcmList
	 * @return
	 */
	int addMyModelS(@Param("rcmList")List<RecordCommonalityModel> rcmList);
}
